Skip to content

Add configurable background colours for cards#16

Merged
fmolinagomez merged 2 commits into
masterfrom
codex/refactor-code-and-add-functionality-gu39qd
Oct 6, 2025
Merged

Add configurable background colours for cards#16
fmolinagomez merged 2 commits into
masterfrom
codex/refactor-code-and-add-functionality-gu39qd

Conversation

@fmolinagomez

Copy link
Copy Markdown
Owner

Summary

  • parse the optional background_color field into card models with a helper to convert it to RGB values
  • paint non-full-frame renders using the configured background colour while updating the docs and sample data
  • add unit tests covering both the model defaults and the rendering behaviour (skipping when cairo is unavailable)

Testing

  • pytest

https://chatgpt.com/codex/tasks/task_e_68e3c63c2b3c832eafdf668c737737e1

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

def load(self, name):
db_path = pathlib.Path(name)
if (not db_path.is_absolute()) and (not db_path.exists()):
db_path = pathlib.Path(__file__).parent / name
with open(db_path, encoding='utf-8') as dbFile:
db = json.load(dbFile)

P0 Badge Import json before using json.load

The refactor dropped the json import from card_model.py, yet CardDeck.load still calls json.load. Instantiating CardDeck now raises NameError: name 'json' is not defined before any card data can be parsed, preventing the CLI and tests from running. Add import json back at the top of this module.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@fmolinagomez fmolinagomez merged commit 188e4c7 into master Oct 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant